<CFPARAM NAME="severityid" DEFAULT="0">


<CFIF isdefined('form.Action')>
	<CFIF form.Action is "INSERT">
		
<CFQUERY name="addseverities" datasource="#application.dsn#">
INSERT INTO severities (
	sortorder

)
VALUES
(
	 #sortorder#

)
</CFQUERY>

		<CFLOCATION url="severities_list.cfm?msg=item has been added">
	
	<CFELSE>
	
	
		
<CFQUERY DATASOURCE="trac_fu" NAME="updateseverities">
UPDATE severities
SET 
sortorder=#sortorder#

WHERE severityid=#severityid#
</CFQUERY>


		<CFLOCATION url="severities_list.cfm?msg=item has been updated">
	
	</CFIF>
</CFIF>

<cfquery datasource="#application.dsn#" name="getseverities">
SELECT * FROM severities
WHERE severityid=#severityid#  
</cfquery>



<FORM action="severities_frmaddedit.cfm" method="post" name="frmseverities">

	<INPUT TYPE="hidden" NAME="severityid" value="<cfoutput>#severityid#</cfoutput>">

<table width="100%" cellspacing="0" cellpadding="0">



		<TR>
			<TD>sortorder</TD>
			<TD><INPUT TYPE="TEXT" NAME="sortorder" VALUE="<cfoutput>#getseverities.sortorder#</cfoutput>"></TD>
		</TR>

	<TR>
		<TD colspan=2>
		<CFIF severityidseverity IS NOT 0>
			<INPUT TYPE="HIDDEN" NAME="Action" VALUE="UPDATE">
			<INPUT TYPE="SUBMIT" VALUE=" UPDATE ">
		<CFELSE>
			<INPUT TYPE="HIDDEN" NAME="Action" VALUE="INSERT">
			<INPUT TYPE="SUBMIT" VALUE=" INSERT ">
		</CFIF>
		</TD>
	</TR>
</TABLE>

</FORM>
